* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_get_has_alpha): Return
gboolean instead of int.
+2000-03-29 Radek Doulik <rodo@helixcode.com>
+
+ * gdk-pixbuf/gdk-pixbuf-animation.c
+ (gdk_pixbuf_animation_new_from_file): same as below
+
+ * gdk-pixbuf/io-gif.c (gif_get_lzw): added update of width and
+ height in GdkPixbufAnimation
+
+2000-03-28 Radek Doulik <rodo@helixcode.com>
+
+ * gdk-pixbuf/io-gif.c (gif_get_lzw): test also for
+ context->frame_done_func and context->anim_done_func to make
+ progressive animation loading work
+
+ * gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
+ added priv->pixbuf = NULL as pixbuf is now in frame (and to make
+ gdk_pixbuf_loader_prepare happy)
+ (gdk_pixbuf_loader_frame_done): update animation bbox
+
+ * gdk-pixbuf/gdk-pixbuf.h: added bbox size (width, height) to
+ _GdkPixbufAnimation
+
+2000-03-27 Radek Doulik <rodo@helixcode.com>
+
+ * gdk-pixbuf/io-gif.c (gif_get_lzw): use frame_len and frame_width
+ instead of width and height
+
2000-03-27 Owen Taylor <otaylor@redhat.com>
* gdk-pixbuf/pixops/pixops.c: Fix problem with
animation->ref_count = 1;
animation->n_frames = 1;
animation->frames = g_list_prepend (NULL, frame);
+ animation->width = gdk_pixbuf_get_width (pixbuf);
+ animation->height = gdk_pixbuf_get_height (pixbuf);
} else {
fseek (f, 0, SEEK_SET);
animation = (* image_module->load_animation) (f);
priv = GDK_PIXBUF_LOADER (loader)->private;
+ priv->pixbuf = NULL;
+
if (priv->animation == NULL) {
priv->animation = g_new0 (GdkPixbufAnimation, 1);
priv->animation->n_frames = 0;
priv->animation->ref_count = 1;
+ priv->animation->width = gdk_pixbuf_get_width (frame->pixbuf);
+ priv->animation->height = gdk_pixbuf_get_height (frame->pixbuf);
+ } else {
+ int w, h;
+
+ /* update bbox size */
+ w = gdk_pixbuf_get_width (frame->pixbuf);
+ h = gdk_pixbuf_get_height (frame->pixbuf);
+
+ if (w > priv->animation->width) {
+ priv->animation->width = h;
+ }
+ if (h > priv->animation->height) {
+ priv->animation->height = h;
+ }
}
priv->animation->frames = g_list_append (priv->animation->frames, frame);
/* List of GdkPixbufFrame structures */
GList *frames;
+
+ /* bounding box size */
+ int width, height;
};
\f
context->pixbuf = gdk_pixbuf_new (ART_PIX_RGB,
context->gif89.transparent != -1,
8,
- context->width,
- context->height);
+ context->frame_len,
+ context->frame_height);
if (context->prepare_func)
(* context->prepare_func) (context->pixbuf, context->user_data);
- if (context->animation || context->frame_done_func) {
+ if (context->animation || context->frame_done_func || context->anim_done_func) {
context->frame = g_new (GdkPixbufFrame, 1);
context->frame->x_offset = context->x_offset;
context->frame->y_offset = context->y_offset;;
}
context->frame->pixbuf = context->pixbuf;
if (context->animation) {
+ int w,h;
context->animation->n_frames ++;
context->animation->frames = g_list_append (context->animation->frames, context->frame);
+ w = gdk_pixbuf_get_width (context->pixbuf);
+ h = gdk_pixbuf_get_height (context->pixbuf);
+ if (w > context->animation->width)
+ context->animation->width = w;
+ if (h > context->animation->height)
+ context->animation->height = h;
}
}
}
}
done:
/* we got enough data. there may be more (ie, newer layers) but we can quit now */
- if (context->animation) {
+ if (context->animation || context->frame_done_func || context->anim_done_func) {
context->state = GIF_GET_NEXT_STEP;
} else
context->state = GIF_DONE;
}
}
- if (context->animation && context->state == GIF_GET_NEXT_STEP) {
+ if ((context->animation || context->frame_done_func || context->anim_done_func)
+ && context->state == GIF_GET_NEXT_STEP) {
if (context->frame_done_func)
(* context->frame_done_func) (context->frame,
context->user_data);
context->animation->ref_count = 1;
context->animation->n_frames = 0;
context->animation->frames = NULL;
+ context->animation->width = 0;
+ context->animation->height = 0;
context->file = file;
gif_main_loop (context);
priv = GDK_PIXBUF_LOADER (loader)->private;
+ priv->pixbuf = NULL;
+
if (priv->animation == NULL) {
priv->animation = g_new0 (GdkPixbufAnimation, 1);
priv->animation->n_frames = 0;
priv->animation->ref_count = 1;
+ priv->animation->width = gdk_pixbuf_get_width (frame->pixbuf);
+ priv->animation->height = gdk_pixbuf_get_height (frame->pixbuf);
+ } else {
+ int w, h;
+
+ /* update bbox size */
+ w = gdk_pixbuf_get_width (frame->pixbuf);
+ h = gdk_pixbuf_get_height (frame->pixbuf);
+
+ if (w > priv->animation->width) {
+ priv->animation->width = h;
+ }
+ if (h > priv->animation->height) {
+ priv->animation->height = h;
+ }
}
priv->animation->frames = g_list_append (priv->animation->frames, frame);